package com.scs.service.impl;

import com.scs.dao.TaskMapper;
import com.scs.pojo.ReleaseTask;
import com.scs.pojo.ReleaseTaskChild;
import com.scs.pojo.UploadTask;
import com.scs.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service(value = "TaskServiceImpl")
public class TaskServiceImpl implements TaskService {
    @Autowired
    private TaskMapper taskMapper;
    @Override
    public int releaseTaskInsert(ReleaseTask releaseTask) {
        return taskMapper.releaseTaskInsert(releaseTask);
    }

    @Override
    public List<ReleaseTask> studentSelectTask(String courseName, String classes, String taskName) {
        return taskMapper.studentSelectTask(courseName,classes,taskName);
    }

    @Override
    public List<String> getTaskNameByCourseNameAndClasses(String classes, String courseName) {
        return taskMapper.getTaskNameByCourseNameAndClasses(classes,courseName);
    }

    @Override
    public int updataReleaseTask(String courseName, String classes, String taskName, String fileName, String path1) {
        return taskMapper.updataReleaseTask(courseName,classes,taskName,fileName,path1);
    }

    @Override
    public List<ReleaseTaskChild> teacherGetTask(String teacherId) {
        return taskMapper.teacherGetTask(teacherId);
    }

    @Override
    public List<ReleaseTaskChild> getTaskById(String taskId) {
        return taskMapper.getTaskById(taskId);
    }
    public List<ReleaseTaskChild>  studentGetTask(String classes,String userId) {
        return taskMapper.studentGetTask(classes,userId);
    }

    @Override
    public int teacherDeleteTask(List<String> taskId) {
        return taskMapper.teacherDeleteTask(taskId);
    }

}
